<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>07.流程语句</title>
    <script>
        // 考试成绩   90 + 优秀  80 以上良好...
        var score = 70;
        if (score >= 90) {
            console.log("优秀...");

        } else if (score >= 80) {
            console.log("良好...");
        } else if (score >= 70) {
            console.log("中等...");
        } else if (score >= 60) {
            console.log("及格...");
        } else {
            console.log("不及格...");
        }
        // if 语句 判断条件可以隐式转换成boolean类型的
        if (0) {
            console.log("xxxx");
        }
        // switch
        // 1 星期一  2 星期二
        var a = 7;
        var selOption = 2;
        switch (selOption) {
            case 1:
                console.log("星期一");
                break;
            case 1+1:
                console.log("星期二");
                break;
            case 3:
                console.log("星期三");
                break;
            case 4:
                console.log("星期四");
                break;
            case 5:
                console.log("星期五");
                break;
            case 6:
                console.log("星期六");
                break;
            case a:
                console.log("星期天");
                break;
            default:
                break;
        }

        switch (selOption) {
            case 1:
               
            case 1+1:
                
            case 3:
             
            case 4:
              
            case 5:
                console.log("工作日");
                break;
            case 6:
            case a:
                console.log("休息日");
                break;
            default:
                break;
        }
    </script>
</head>

<body>

</body>

</html>